package com.weme.common.manager

import com.weme.common.socket.base.CoderFactory
import com.weme.common.socket.base.DecoderAdapter
import com.weme.common.socket.base.EncoderAdapter
import org.java_websocket.client.WebSocketClient


/**
 *
 * 消息Coder生产的Factory
 *
 * @author 
 *
 */
class MessageCoderFactory : CoderFactory {

    /**
     * 消息解码器
     */
    private val decoder = Decoder()

    /**
     * 消息编码器
     */
    private val encode = Encoder();


    override fun getDecoder(client: WebSocketClient?): DecoderAdapter {
        return decoder
    }

    override fun getEncoder(client: WebSocketClient?): EncoderAdapter {
        return encode
    }
}